<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 300px;
            height: 300px;
            border: 2px groove black;
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <script>
        var data = [{
            name:':·.',
            age:'∵·∴',
        }]
        var str = `名字是${data[0].name},年龄是${data[0].age}`
        var box = document.querySelector('.box')
        box.innerHTML = str

        // 模板字符串:
        //          (1)保留换行
        //          (2)可以正常放'' ""
        //          (1)可以放变量
    </script>
</body>
</html>